<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1 {
	width: 195px;
}

.select_width {
	width: 130px;
}
</style>
<input type="hidden" name="organization/whether_is_gaoxin_value" value="<x:out select="$xmlData/data/organization/whether_is_gaoxin_value" />"/>
<input type="hidden" name="organization/whether_industrial_base_value" value="<x:out select="$xmlData/data/organization/whether_industrial_base_value" />"/>
<input type="hidden" name="organization/whether_is_province_value" value="<x:out select="$xmlData/data/organization/whether_is_province_value" />"/>
<input type="hidden" name="proposal/contact_psn_tel" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>"/>
<input type="hidden" name="proposal/contact_psn_email" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>"/>

<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInfo" cellspacing="1">
	<col style="width: 25%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<tr>
		<td colspan="6" class="t_bar2">${param.title}</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>项目名称：</td>
		<td colspan="5"><input id="project_name" name="proposal/zh_title" label="${param.title}-->项目名称" type="text" required class="input_css required maxlength:100" 
		style="width: 604px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />" /></td>
	</tr>
	<tr>
        <td align="right"><span class="color_red">*</span>归口管理部门：</td>
		<td colspan="2">
		    <c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set> 
		    <cpt:tree id="recomend_org" key="recommended_org" cacheable="false" className="hn_iuput_kuang required selectWidth3" readonly="true" value="${recomend_org}" label="${param.title}-->归口管理部门" 
		              showPattern="all" shieldPattern="0" onClick="initTreeValue2"></cpt:tree> 
		    <input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" >
		    <input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>
	    <td align="right" ><span class="color_red">*</span>申报日期：</td>
		<td colspan="2"> <c:set var="apply_date_curr"><x:out select="$xmlData/data/proposal/apply_date_curr" /></c:set>
			<cpt:date id="apply_date_curr"  name="proposal/submit_date" value="${submit_date}" className="required date"  label="${param.title}-->申报日期" ></cpt:date> 
		</td>
	</tr>
		<tr>
		<td align="right"><span class="color_red">*</span>项目联系人姓名：</td>
		<td colspan="2"><input id="linkman_name" name="proposal/linkman_name" label="${param.title}-->项目联系人姓名" type="text" required class="input_css required maxlength:100" 
		style="" maxlength="100" value="<x:out select="$xmlData/data/proposal/linkman_name" />" /></td>
		<td align="right"><span class="color_red">*</span>联系人手机：</td>
		<td colspan="2"><input id="linkman_phone" name="proposal/linkman_phone" label="${param.title}-->联系人手机" type="text" required class="input_css required maxlength:100" 
		style=""onfocus="InitInput.setNumber(this,11,0,0);" maxlength="100" value="<x:out select="$xmlData/data/proposal/linkman_phone" />" /></td>
	</tr>
<%-- 	<tr>
		<td align="right">项目联系人姓名：</td>
		<td colspan="2"><span name="proposal/contact_psn_cname"> <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_name" />
		    </span> <span name="proposal/contact_email" style="display: none;"> <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email" />
		    </span> <span name="proposal/contact_tel" style="display: none;"> <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel" /></span>
		</td>
		<td align="right">联系人手机：</td>
		<td colspan="2"><span name="proposal/contact_psn_mobile"> <x:out
			select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_mobile" />
		</span></td>
	</tr> --%>
	<tr>
		<%-- <td align="right"><span class="color_red">*</span>项目报审级次：<br/>（省补助资金拨付所属财政局）</td>
	    <td colspan="2">
	        <c:set var="sub_step">{'id':'<x:out select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
			<cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang" readonly="true" value="${sub_step}"  label="项目报审级次"
         		      id="sub_step"  showPattern="all" shieldPattern="0" topCheckbox="false" onClick="initTreeValue" />
			<input type="hidden" id="sub_step_value" name="proposal/sub_step_value"  class="required"  value="<x:out select="$xmlData/data/proposal/sub_step_value" />" label="${param.title}-->项目报审级次">
			<input type="hidden" name="proposal/sub_step_name" value="<x:out select="$xmlData/data/proposal/sub_step_name" />">
		</td> --%>
		<td align="right"><span class="color_red">*</span>项目报审级次：<br/>（省补助资金拨付所属财政局）</td>
	        <td colspan="2">
				<c:set var="sub_step">{'id':'<x:out select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
	          	<cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang  " readonly="true" value="${sub_step}"  label="项目报审级次" id="sub_step" onlyChooseLeaf="false" showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />
		        <input id="sub_step_value" type="hidden" name="proposal/sub_step_value" class="required" label="项目报审级次" value="<x:out select="$xmlData/data/proposal/sub_step_value" />"/>
	            <input id="sub_step_name" type="hidden" name="proposal/sub_step_name"  value="<x:out select="$xmlData/data/proposal/sub_step_name" />"/>
			</td>
		<td align="right"><span class="color_red">*</span>项目申请金额（万元）：</td>
		<%-- <td colspan="2"><input id="total_shenqingjine" name="proposal/shenqingjine" onchange="countFundAuto('total_','shenqingjine','provincial_subsidies');" label="${param.title}-->项目申请金额（万元）" onfocus="InitInput.setNumber(this,9,4,2);" type="text" required 
		    class="input_css required maxlength:100" value="<x:out select="$xmlData/data/proposal/shenqingjine" />"style="text-align: right;" /></td>	 --%>
		<td colspan="2"><input id="shenqingjine" name="proposal/shenqingjine" label="${param.title}-->项目申请金额（万元）" onfocus="InitInput.setNumber(this,9,4,2);" type="text" required 
		    class="input_css required maxlength:100" value="<x:out select="$xmlData/data/proposal/shenqingjine" />"style="text-align: right;" /></td>	
	</tr>
	</table>
	
<table id="eq_table1" cellpadding="0" class="t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<col style="width: 5%" />
	<col style="width: 5%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<thead>
		<tr style="border: 1px solid #B7D1E6">
		    <th class="TblHead" align="center" >选择</th>
		    <th class="TblHead" align="center" >序号</th>
			<th class="TblHead" align="center" >财务收费凭证号</th>
			<th class="TblHead" align="center" >仪器设备名称</th>
			<th class="TblHead" align="center" >仪器设备型号</th>
			<th class="TblHead" align="center" >入网仪器设备编号</th>
			<th class="TblHead" align="center" >使用时间（小时）</th>
			<th class="TblHead" align="center" >出租服务费用（万元）</th>
		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td align="center"><input type="radio" name="selMileStones" style="border:0px;background-color:white"></td>
			<td align="center"><span name="proposal|kexueyiqi|kexueyiqi_list[0]@seq_no">[index]</span></td>
			<td align="center"><input type="text" name="proposal|kexueyiqi|kexueyiqi_list[0]|caiwushoufei_num" value=""
			    class="hn_iuput_kuang1 required maxlength:50"  style="width: 80%; text-align: left;" label="财务收费凭证号"maxlength="50" /></td>
			    
		    <td align="center"><input type="text" name="proposal|kexueyiqi|kexueyiqi_list[0]|yiqishebei_name" value="" 
			    class="hn_iuput_kuang1 required maxlength:50"  style="width: 80%; text-align: left;" label="仪器设备名称"maxlength="50" /></td>
			    
		    <td align="center"><input type="text" name="proposal|kexueyiqi|kexueyiqi_list[0]|yiqishebei_number" value="" 
			    class="hn_iuput_kuang1 required maxlength:50"  style="width: 80%; text-align: left;" label="仪器设备型号"maxlength="50" /></td>
			    
		    <td align="center"><input type="text" name="proposal|kexueyiqi|kexueyiqi_list[0]|ruwangyiqi_num" value=""  
			    class="hn_iuput_kuang1 required maxlength:50"  style="width: 80%; text-align: left;" label="入网仪器设备编号"maxlength="50" /></td>
			    
			<td align="center"><input type="text" name="proposal|kexueyiqi|kexueyiqi_list[0]|shiyong_time" value="" onfocus="InitInput.setNumber(this,9,1,0)";
			    class="hn_iuput_kuang1 required maxlength:50"  style="width: 80%; text-align: right;" label="使用时间（小时）"maxlength="50" /></td>
			    
			<td align="center"><input type="text" name="proposal|kexueyiqi|kexueyiqi_list[0]|chuzhu_cost" value="" onfocus="InitInput.setNumber(this,9,4,2);"label="出租服务费用(万元)"maxlength="50" 
			    onchange="autoCalFund('eq_table1','chuzhu_cost','chuzhu_cost_sum');" class="hn_iuput_kuang1 required maxlength:50"  style="width: 80%; text-align: right;" /></td>			

		</tr>
        <c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/proposal/kexueyiqi/kexueyiqi_list" var="kexueyiqi_list">
			<c:choose>
				 <c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
				<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
			</c:choose>
			<tr>
			    <td align="center"><input type="radio" class="radiobutton" name="selMileStones"></td>
			    <td align="center"><span name="proposal/kexueyiqi/kexueyiqi_list[${flag}${index}]@seq_no"><x:out select="$kexueyiqi_list/@seq_no" /></span></td>
				<td align="center"><input type="text" name="proposal/kexueyiqi/kexueyiqi_list[${flag}${index}]/caiwushoufei_num" value="<x:out select="$kexueyiqi_list/caiwushoufei_num"/>" 
				    class="hn_iuput_kuang1 required maxlength:50" style="width: 80%; text-align: left;" label="财务收费凭证号"maxlength="50" /></td>
				 
				<td align="center"><input type="text" name="proposal/kexueyiqi/kexueyiqi_list[${flag}${index}]/yiqishebei_name" value="<x:out select="$kexueyiqi_list/yiqishebei_name"/>" 
				    class="hn_iuput_kuang1 required maxlength:50" style="width: 80%; text-align: left;" label="仪器设备名称"maxlength="50" /></td>
				    
			    <td align="center"><input type="text" name="proposal/kexueyiqi/kexueyiqi_list[${flag}${index}]/yiqishebei_number" value="<x:out select="$kexueyiqi_list/yiqishebei_number"/>" 
				    class="hn_iuput_kuang1 required maxlength:50" style="width: 80%; text-align: left;" label="仪器设备型号"maxlength="50" /></td>
				    
			    <td align="center"><input type="text" name="proposal/kexueyiqi/kexueyiqi_list[${flag}${index}]/ruwangyiqi_num" value="<x:out select="$kexueyiqi_list/ruwangyiqi_num"/>" 
			        class="hn_iuput_kuang1 required maxlength:50" style="width: 80%; text-align: left;" label="入网仪器设备编号"maxlength="50" /></td>
				    
				<td align="center"><input type="text" name="proposal/kexueyiqi/kexueyiqi_list[${flag}${index}]/shiyong_time" value="<x:out select="$kexueyiqi_list/shiyong_time"/>"
				     onfocus="InitInput.setNumber(this,9,1,0);" class="hn_iuput_kuang1 required maxlength:50"style="width: 80%; text-align: right;" label="使用时间（小时）"maxlength="50" /></td>
				    
				<td align="center"><input type="text" name="proposal/kexueyiqi/kexueyiqi_list[${flag}${index}]/chuzhu_cost" value="<x:out select="$kexueyiqi_list/chuzhu_cost"/>" onfocus="InitInput.setNumber(this,9,4,2);"
				    onchange="autoCalFund('eq_table1','chuzhu_cost','chuzhu_cost_sum')" class="hn_iuput_kuang1 required maxlength:50"style="width: 80%; text-align: right;" label="出租服务费用(万元)"maxlength="50" /></td>
			</tr>


			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
	</tbody>
</table>

<table cellpadding="0" class="table01 t_css" id="basicInfo2" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<col style="width: 30%" />
	<col style="width: 20%" />
	<col style="width: 30%" />
	<col style="width: 20%" />
	<tr>
		<td align="center">出租服务费用总计（万元）</td>
		<td align="center"><input name="proposal/kexueyiqi/chuzhu_cost_sum" id="chuzhu_cost_sum" value="<x:out select="$xmlData/data/proposal/kexueyiqi/chuzhu_cost_sum"/>"
		    class="hn_iuput_kuang1 maxlength:50 gray" onfocus="InitInput.setNumber(this,9,4,2);" style="width: 80%; text-align: right;" disabled maxlength="50"  type="text"/> </td>
		<td align="center"><span class="color_red">*</span>申请省补助金额（万元）</td>
		<td><input  class="required"  style="text-align:right; width:80%;" label="${param.title}-->申请省补助金额（万元）"  onfocus="InitInput.setNumber(this,9,2,2)" id="provincial_subsidies" name="proposal/provincial_subsidies" value="<x:out select="$xmlData/data/proposal/provincial_subsidies"/>" /></td>
<%-- 		<td><input  class="gray" disabled style="text-align:right; width:80%;"  onfocus="InitInput.setNumber(this,9,2,2)" id="total_provincial_subsidies" name="proposal/provincial_subsidies" value="<x:out select="$xmlData/data/proposal/provincial_subsidies"/>" /></td> --%>
	</tr>

</table>

<table width="98%" align="center">
	<tr>
		<td><input class="button_02" name="cmdAddbefore"type=button value="添加" 
		           onclick="if(checkTabLimit('eq_table1',999,'')){addNewRow('eq_table1');showDateTag('eq_table1');}try{top.resizeFrame();}catch(e){};">
			<input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('eq_table1','selMileStones');"> 
			<input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('eq_table1','selMileStones');">
		    <input class="button_02" name="cmddel" type=button value="删除" 
		           onclick="deleteSelectedRow('eq_table1','记录');autoCalFund('eq_table1','chuzhu_cost','chuzhu_cost_sum');autoCalFund('eq_table1','shiyong_time','shiyong_time_sum');autoCalFund('eq_table1','yiqishebei_num','yiqibuzhu_sum');">
		</td>
	</tr>
</table>
<br />
<script type="text/javascript">
function initTreeValueExt(treeId, treeNode) {
 	if ((treeNode && treeNode.isParent)) {
 		scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
 		$("#" + treeId).val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId	+ "_value']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
 		return false;
 	}
 	var str = treeNode.name;
 	var obj = treeNode.parentNode;
 	while (obj != null) {
 		str = obj.name + "-" + str;
 		obj = obj.parentNode;
 	}
 	
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
 }
//合计
function autoCalFund(tabid, endName, targetId) {
	
	var num = 0.00;
	$("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
			function() {
				if ($(this).val() == '' || $(this).val() == undefined) {
					return;
				}
				num = num * 10000 + parseFloat($(this).val()) * 10000;
				num = (num / 10000).toFixed(4);
			});
        $("#" + targetId).val(formatNumberAutoOther(num.toString(), 9, 4, 2)); 
}

	
/* 	if(targetId == "yiqibuzhu_sum"){
		var num = 0.00;
		$("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
				function() {
				    if ($(this).val() == '' || $(this).val() == undefined) {
						return;
						}
						num = num +1;
			   		});
				$("#" + targetId).val(num);}
	else if(targetId == "shiyong_time_sum"){
					var num = 0.00;
					$("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
						function() {
						    if ($(this).val() == '' || $(this).val() == undefined) {
								return;
								}
								num = num + parseFloat($(this).val());
					   		});
						$("#" + targetId).val(num);
				}
	else if(targetId == "chuzhu_cost_sum"){ */

	

	function initTreeValueTeamPerson(treeId, treeNode) {
		//针对单位性质
		if ((treeNode && treeNode.isParent)) {
			scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_code'],[id$='" + treeId
									+ "_code']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val("");
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val("");
			return false;
		}
		var str = treeNode.name.split("-")[0];
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_value'],[id$='" + treeId + "_value']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val(str);
		$("#" + treeId).val(str);
		initTreeValue2CallBack();
	}

	function setZhTitle(obj) {
		$("#intro_zh_title").text($(obj).val());
	}
	function localInitTreeValue(treeId, treeNode) {
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			return false;
		}

		var showName = "";
		var parentId = "";
		if (treeNode != null && treeNode.level == 1) {//选择二级
			str = obj.name + "-" + str;
			//obj = obj.parentNode;
			showName = obj.name;
			parentId = obj.id;
			$("#" + treeId).val(showName);
			$("#" + treeId).parents("tr").find("[name$='domain_value']").val(
					treeNode.id);
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val(
					str.split("_")[str.split("_").length - 1]);
			$("#" + treeId).parents("tr").find("[name$='domain_name']").text(
					treeNode.name.split("_")[0]);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val(parentId);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val(showName);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
							+ "_all_name']").val(str);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
							+ "_all_value']").val(treeNode.id);
		} else if (treeNode != null && treeNode.level == 2) {//选择三级
			str = obj.name + "-" + str;
			obj = obj.parentNode;
			showName = obj.name;
			parentId = obj.id;
			$("#" + treeId).val(showName);
			$("#" + treeId).parents("tr").find("[name$='domain_value']").val(
					treeNode.parentNode.id);
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val(
					str.split("_")[1].split("-")[0]);
			$("#" + treeId).parents("tr").find("[name$='domain_name']").text(
					str.split("_")[0]);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val(parentId);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val(showName);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
							+ "_all_name']").val(str);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
							+ "_all_value']").val(treeNode.id);
		} else {
			$("#" + treeId).val(str);
			$("#" + treeId).parents("tr").find("[name$='domain_value']")
					.val("");
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val("");
			$("#" + treeId).parents("tr").find("[name$='domain_name']")
					.text("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
							+ "_all_name']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
							+ "_all_value']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val(treeNode.id);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val(str);
		}

	}
	function setEmptyValueForTree(id) {
		$("#" + id).parents("tr").find("[name$='domain_value']").val("");
		$("#" + id).parents("tr").find("[name$='subject_no']").val("");
		$("#" + id).parents("tr").find("[name$='domain_name']").text("");
		$("#" + id).parents("td").find(
				"[name$='" + id + "_all_name'],[id$='" + id + "_all_name']")
				.val("");
		$("#" + id).parents("td").find(
				"[name$='" + id + "_all_value'],[id$='" + id + "_all_value']")
				.val("");
		$("#" + id).val("");
		$("#" + id + "_hideId").val("");
		$("#" + id + "_hideName").val("");
		$("#" + id + "_code").val("");
		$("#" + id + "_value").val("");
		$("#" + id + "_name").val("");
		$(
				"#" + id + ",[name$='/" + id + "_code']" + ",[name$='/" + id
						+ "_name'],[name$='/" + id + "_value']").val("");
	}
	function showText(obj) {

		if (($(obj).attr("checked") == "checked")) {
			$("#" + $(obj).attr("name") + "_other").css("display", "");
			$("#" + $(obj).attr("name") + "_other").addClass("required");
		} else {
			$("#" + $(obj).attr("name") + "_other").css("display", "none");
			$("#" + $(obj).attr("name") + "_other").val("");
			$("#" + $(obj).attr("name") + "_other").removeClass("required");
		}
	}
	$(document).ready(function() {
		$('#basicInfo tr:even').addClass("li_2");
		$('#basicInfo tr:odd').addClass("li_1");

	});
	function count() {
		$("#eq_table1 tr:gt(1)").each(function() {
			var price_each=$(this).find("td:eq(4) input").val();
			var num=$(this).find("td:eq(5) input").val();
			$(this).find("td:eq(6) input").val(formatVal(price_each*num));
		});
		$("#eq_table2 tr:gt(1)").each(function() {
			var price_each=$(this).find("td:eq(4) input").val();
			var num=$(this).find("td:eq(5) input").val();
			$(this).find("td:eq(6) input").val(formatVal(price_each*num));
		});
	}
	function formatVal(count) {
		if (!$.isNumeric(count))
		count = "0";
		count = ((parseFloat(count) * 10000) / 10000).toFixed(4);
		count = formatNumberAuto(count.toString(), 9, 4, 2);// 格式化金额
		return count;
	}
	function checkTab2() {
		if($("#eq_table2 tr").length>2){
	    	$("#eq_tab2_val").val("1");
	    }else{
	    	$("#eq_tab2_val").val("");
	    }
	}	
 

</script>
